package org.raymond.iworks.study.mq.kafka.consumer;

import lombok.extern.slf4j.Slf4j;
import org.raymond.iworks.study.mq.kafka.common.Bar2;
import org.raymond.iworks.study.mq.kafka.common.Foo2;
import org.springframework.kafka.annotation.KafkaHandler;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;
/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
@Slf4j
@Component
@KafkaListener(id = "group_demo7", topics = {"demo7-foo", "demo7-bar"})
public class Demo7Consumer {
    @KafkaHandler
    public void foo(Foo2 foo) {
        log.info("Received7 foo: {}", foo);
    }
    @KafkaHandler
    public void bar(Bar2 bar) {
        log.info("Received7 bar: {}", bar);
    }
    @KafkaHandler(isDefault = true)
    public void unknown(Object object) {
        log.info("Received7 unknown: {}", object);
    }
}
